It is necessary to write lishmah, and other laws of writing; one does not invert a sheet
1. Sifrei Torah, tefillin and mezuzot must be written with great concentration and lishmah, and this must be verbalised before one begins to write. That is, before he starts to write he must say “I write this sefer for the holiness of a sefer Torah.” This is sufficient for the entire sefer (gloss: except for the Divine Names, which must be sanctified separately, sv para 10), and so too for tefillin and mezuzah; he must say “for the holiness of tefillin” “mezuzah.” And if it does not issue from his lips – if he only thinks it – some opinions rule that this is invalid even post facto, and some opinions rule that it is acceptable post facto, which seems to be the general idea.
2. If one starts to nod off, he should not write in that state, because he does not then have concentration (Orah Hayyim 32:19). So too if he had drunk intoxicating liquor: he should not write so, because he cannot concentrate appropriately .
3. Each and every letter must be entirely written lishmah, since if even a only small part was written not lishmah, and most of it was written lishmah, it is still invalid (Mahari”ch, 1:1). All the more so if a small part of the letter was not made by writing at all, for instance if a drop of ink fell and he made it into a letter: it is invalid (see Excursus 1) (Knesset ha-Gedolah and Peri Megadim in Even ha-Ezer 125). Even if he subsequently wrote, lishmah, over the whole letter with a quill, it is of no effect; the upper layer of writing does not help.
4. Before one starts to write he should test his pen, to see that there is not an excess of ink, which will spoil it.
5. When one writes a sefer Torah, there must be another sefer before him, thoroughly proofread, from which he will copy, because it is forbidden to write even one letter without reference to another copy. Therefore, every sofer should take care to have a humash which has been thoroughly proofread, by an expert well versed in proofreading, from which to copy. But in any case, it is not necessary to take each letter one by one from the copy, but in the manner of copyists he may take two or three words at a time, or more as they appear naturally in the Torah (Benei Yonah). If he did write without reference to a copy, some forbid reading from it unless in extremely straitened circumstances (the Ran in the name of the Yerushalmi), and there are those who say that post facto it is not invalidated (ha-rav Rabbi Menoah).
6. Even if one is transcribing from a copy, he must also speak each word out loud before he writes it, in order that he not err (Rashi and Tosafot, Menahot 30), and also in order that the holiness of the breath of reading of each and every word which comes from his mouth is drawn over the words (Ba”h). Only words of admonition need not be spoken aloud (Tosafot, Mordechai).
7. One must be exacting regarding the haser and yeter spellings, for if he wrote an extended word without some of its letters or a contracted word with extra letters, it is invalid. A word which has differing oral and lexical traditions, such as the written word yishgalenah [he will fornicate with her, Dev 28:30] which is spoken yishkavenah [he will lie with her], or the word written u-ve-`ofelim [and with swellings, Dev 28:27] which is spoken u-vatehorim [and with haemorrhoids], and the like, must be written with the lexical tradition, and if he changed it and wrote according to the oral tradition, it is invalid.
8. Tefillin and mezuzot: if one knows the texts very well he may write them without transcribing from a copy, provided he says each word aloud.
9. Even when transcribing from a copy, it is not appropriate that one should write unless he knows how to read, and if he does not know how to read, even if he knows the letters he is very likely to err, because he does not perceive it.
10. It is permitted to take up ink from the letter that was written when he needs ink for another part of the writing, or even to dispose of it if he needs to – in order to make it dry faster so that he can roll the sefer up – but he is forbidden to use it for a secular purpose (Siftei Cohen). It is forbidden to take up ink from the divine Name, even if he wants to use it to write another divine Name. Only if there is an inappropriate amount of ink in it may we be lenient – even to dispose of it – because when he started he only sanctified what he needed, and the excess would spoil it (Benei Yonah) (and see below, 10:10).
11. Those who write sefarim, tefillin and mezuzot: when they come to lay the sheet down so that it will dry, they may not turn the writing face down, even if the intent was to prevent dust settling on the writing; in all cases it is degrading. Rather, the writing should be face up, and he should spread a garment over it or double it over (Rambam), and where this is impossible he may turn it over since not turning it over would be a greater degredation.